<html>
<body>
Reports implementations of <code>Iterator.next()</code>
that cannot throw <code>java.util.NoSuchElementException</code>.
<p>
  Such implementations violate the contract of <code>java.util.Iterator</code>,
  and may result in subtle bugs if the iterator is used in a non-standard way.
</p>
<p><b>Example:</b></p>
<pre><code>
  class Numbers implements Iterator&lt;Integer&gt; {
    @Override
    public Integer next() { //warning
        if (hasNext()) {
            return generateNext();
        } else {
            return null; //throw NoSuchElementException instead
        }
    }

    ...
  }
</code></pre>
<!-- tooltip end -->
</body>
</html>